<div id="div_add_video_id" class="videos form inline_form">


<?php echo $this->Form->create('Video');?>
	<fieldset>
		<legend><?php __('Tạo mới Video - Nhập Id Video'); ?></legend>
	<?php
		echo $this->Form->input('catvideo_id',array('label'=>'Chuyên muc'));
		echo $this->Form->input('videoid',array('label'=>'ID video'));
		echo $this->Form->input('status',array('label'=>'Trạng Thái'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div id="div_add_video_seaarch" class="videos form inline_form add_videos">
<?php echo $this->Form->create('Video',array('action'=>'add_multi','onsubmit'=>'return false;'));?>
	<fieldset>
		<legend><?php __('Tạo mới Video - Sreach form website Youtube'); ?></legend>
	<?php
		//echo $this->Form->input('catvideo_id',array('label'=>'Chuyên muc'));
		
		$option_select = array(
			'search' => 'Tìm tất cả',
			'most_viewed'			=> 'Most Viewed',
			'top-five'			=> 'Top five',
			'Travel'			=> 'Travel',
			'top_rated'			=> 'Top Rated',
			'most_recent'			=> 'Most Recent',
			'recently_featured'			=> 'Recently featured',
			'on_the_web'			=> 'Trending videos'
		);
		echo $this->Form->input('sl_search',array('label'=>'Kiểu tìm kiếm','type'=>'select','options'=>$option_select,'name'=>'aj_sl_search','id'=>'aj_sl_search'));
		echo $this->Form->input('keyword', array('label'=>'Nhập từ khóa cần tìm','id'=>'aj_admin_keyword','name'=>'aj_admin_keyword'));
	?>
	<a id="a_search_video" onclick="search_ajax();" href="#"><img class="search_img_admin" src="<?php echo $this->webroot;?>img/search.jpg"/></a>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div id="admin_research_youtube"  class="videos form inline_form add_videos">
</div>
<script>
	function search_ajax(){
			var aj_admin_keywork = $("#aj_admin_keyword").val();
			var aj_admin_type_search = $("#aj_sl_search").val();
			var url = '<?php echo $this->Html->url('/videos/ajax_admin_youtube_ajax_search');?>';
			$('#admin_research_youtube').fadeIn().html('<?php echo $this->Html->image('loadingcircle.gif') ?>');
			$.post(url,{set_txt_search : aj_admin_keywork,set_select_search:aj_admin_type_search},function(data){
			$('#admin_research_youtube').html(data);
			});
			return false;
	}
</script>

